pub struct Solution;

impl Solution {
    pub fn find_disappeared_numbers(nums: Vec<i32>) -> Vec<i32> {
        let len = nums.len();
        let mut arr = vec![0; len];

        for num in nums {
            arr[(num - 1) as usize] = 1;
        }
        let mut result = vec![];
        for i in 0..arr.len() {
            if arr[i] == 0 {
                result.push(i as i32 + 1);
            }
        }
        result
    }
}